package com.ys;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.ys.entity.base.BaseEntity;

/**
 * Hello world!
 *
 */
@SpringBootApplication(
	exclude = {
		org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class, //  排除springSecurity自动装配
		DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class //  排除数据源自动装配
	}
)
//@SpringBootApplication
@EnableCaching
@MapperScan(basePackages = "com.ys.mapper")
@ComponentScan(basePackages={"com.ys"})
@EnableTransactionManagement
//@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
public class App {
	public static void main(String[] args) {
		System.out.println("Hello World!");
		ConfigurableApplicationContext context = SpringApplication.run(App.class, args);
		BaseEntity.ac = context;
	}
}
